import { fileURLToPath, URL } from "node:url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

export default defineConfig({
  base: "./",
  plugins: [vue()],
  css: {
    // vite
    preprocessorOptions: {
      scss: {
        additionalData: `@import '@/styles/settings/var.scss';@import '@/styles/tools/_sassMagic.scss';`,
      },
    },
    postcss: {
      plugins: [
        require("postcss-plugin-px2rem")({
          rootValue: 37.5,
          exclude: /(node_module)/,
          minPixelValue: 3,
        }),
      ],
    },
  },
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url)),
    },
  },
});
